﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.SqlClient;
using System.Data;
using System.Collections;

using XJX.DataLayer;

namespace XJX.BusinessLayer
{
    public class Family
    {
        private string ConnToData;

		public Family(string newConnectionString)
		{
			ConnToData=newConnectionString;
		}

        //修改家庭信息
        public bool modify_One_Family_Info
        (
            string UID,
            string Sname,
            string sex,
            string Fname,
            string mobile,
            out int ReturnValue
            )
        {
            bool b;

            try
            {
                b = new XJX.DataLayer.Family(ConnToData).modify_One_Family_Info(UID,Sname,sex,Fname,mobile, out ReturnValue);
            }
            catch (SqlException e)
            {
                throw new System.Exception(e.Message);
            }
            return b;
        }

        //依据UID，获取家庭用户信息
        public DataTable Get_One_Family_Info_From_UID(string UID)
        {
            DataTable dt = new DataTable();

            DataSet ds = new XJX.DataLayer.Family(ConnToData).Get_One_Family_Info_From_UID(UID);
            dt = ds.Tables[0];

            return dt;
        }

    }
}
